package com.shoesdemo.activity;

import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;

import androidx.core.app.ActivityOptionsCompat;

import com.shoesdemo.BaseActivity;
import com.shoesdemo.R;


public class WelcomeActivity extends BaseActivity {

    private CountDownTimer mCountDownTimer;

    @Override
    protected void initView() {
        actionBar.hide();
    }

    @Override
    protected void initListener() {

    }

    @Override
    public int getLayoutView() {
//        requestWindowFeature(Window.FEATURE_NO_TITLE);
//        // 隐藏状态栏
//        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
//                WindowManager.LayoutParams.FLAG_FULLSCREEN);
        return R.layout.activity_welcome;
    }

    @Override
    protected void initData() {
        mCountDownTimer = new CountDownTimer(1000, 1000) {
            @Override
            public void onTick(long lastTimeStamp) {

            }

            @Override
            public void onFinish() {
                Intent intent=new Intent(WelcomeActivity.this, TomorrowMainActivity.class);
                Bundle bundle = ActivityOptionsCompat.makeSceneTransitionAnimation(WelcomeActivity.this,findViewById(R.id.iv_tomorrow),"share").toBundle();
                startActivity(intent,bundle);
                finish();
            }
        };
        mCountDownTimer.start();
    }


}
